//
//  ActivityViewCell.m
//  NewPro
//
//  Created by 何荧红 on 2018/10/14.
//  Copyright © 2018 何荧红. All rights reserved.
//

#import "ActivityViewCell.h"
@interface ActivityViewCell ()
@property (nonatomic, strong) UIImageView *bgimage;

@end

@implementation ActivityViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)setModel:(ActionModel *)model{
    _model = model;
    if (_model) {
        [_bgimage sd_setImageWithURL:[NSURL URLWithString:_model.type]];
    }
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.layer.masksToBounds = YES;
        self.layer.cornerRadius = 5;
        self.bgimage = [[UIImageView alloc]init];
        [self addSubview:_bgimage];
        [_bgimage mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.mas_equalTo(0);
        }];
    }
    return self;
}

- (void)setFrame:(CGRect)frame{
    frame.origin.x += 14;
    frame.size.width -= 28;
    frame.origin.y += 10;
    frame.size.height -= 10;
    [super setFrame:frame];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

@end
